package top.juntower.service.impl;

import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.juntower.dao.FootMapper;
import top.juntower.pojo.FootType;
import top.juntower.pojo.dto.FootDta;
import top.juntower.pojo.vo.FootVo;
import top.juntower.pojo.vo.RankingFootVo;
import top.juntower.service.FootService;

import java.util.List;
import java.util.Map;

@Service
public class FootServiceImpl implements FootService {

    @Autowired
    private FootMapper footMapper;


    @Override
    public List<FootDta> queryAllFoot(Integer pageNum, Integer pageSize) {
        return footMapper.queryAllFoot(pageNum,pageSize);
    }

    @Override
    public List<FootDta> queryAllFootByFtId(Integer ftId, Integer pageNum, Integer pageSize) {
        return footMapper.queryAllFootByFtId(ftId,pageNum,pageSize);
    }


    @Override
    public FootVo queryAllFootByFId(Integer fId) {
        return footMapper.queryAllFootByFId(fId);
    }

    @Override
    public int updateVisits(Integer fId) {
        return footMapper.updateVisits(fId);
    }

    @Override
    public List<RankingFootVo> queryRankingFoots() {
        return footMapper.queryRankingFoots();
    }

    @Override
    public List<RankingFootVo> queryRankingFootByFtId(Integer ftId) {
        return footMapper.queryRankingFootByFtId(ftId);
    }

    @Override
    public int deletefootById(Integer fId, Integer fState) {
        return footMapper.deletefootById(fId, fState);
    }


    @Override
    public List<FootVo> queryAllFootBackstage(Integer pageNum, Integer pageSize) {
        return footMapper.queryAllFootBackstage(pageNum, pageSize);
    }

    @Override
    public List<FootDta> queryAllFootDtaLike(String footName, Integer pageNum, Integer pageSize) {
        return footMapper.queryAllFootDtaLike(footName, pageNum, pageSize);
    }

    @Override
    public int updateFootById(Map map) {
        return footMapper.updateFootById(map);
    }

    @Override
    public int addFoot(Map map) {
        return footMapper.addFoot(map);
    }

    @Override
    public List<FootType> queryFootType() {
        return footMapper.queryFootType();
    }


}
